import redis

r = redis.Redis(host='localhost', db=0)
if __name__ == '__main__':
    print('start 《redis in Action》')
    # user = r.hset('article:1112',  mapping={
    #     'title': 'Redis in Action',
    #     'link': 'https://www.redis.io',
    #     'poster': 'https://www.redis',
    #     'time': '2019/01/01',
    #     'votes': '0'
    # })
    art = 'hello'
    user = {
        art: 'world'
    }

    print(user)
    # for k,v in user.items():
    #     print(k, v.decode('utf-8'))
    # print(hello.decode('utf-8'))
